package com.t11;

import net.mindview.simple.List;

import java.util.LinkedList;
import java.util.Queue;

/**
 * Created by xuyiwei on 2018/7/22.
 */
class Command{
    private String s;
    public Command(String s) {
        this.s = s;
    }
    public String getS() {
        return s;
    }

    @Override
    public String toString() {
        return "Command{" +
                "s='" + s + '\'' +
                '}';
    }
}
class Producs{
    private static Queue<Command> queue = new LinkedList<Command>();
    public static Queue<Command> product(){
        queue.offer(new Command("1"));
        queue.offer(new Command("2"));
        queue.offer(new Command("3"));
        queue.offer(new Command("4"));
        return queue;
    }
}
public class E27 {
    public static void main(String[] args) {
        Queue<Command> queue = Producs.product();
        while (queue.peek()!=null){
            System.out.println(queue.remove()+" ");
        }
    }
}
